home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15135 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.gate.net!news-adm
  2. From: Ross Mcintosh <travismc@gate.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Inline Assembler Error
  5. Date: Wed, 03 Apr 1996 16:06:49 -0800
  6. Organization: CyberGate, Inc.
  7. Message-ID: <31631299.116A@gate.net>
  8. NNTP-Posting-Host: tpafl2-50.gate.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.01 (Win95; I)
  13.  
  14. I'm a recent convert from Pascal and I'm having trouble using Borland C++'s inline assembler.  I keep getting 
  15. a Undefined Lable "_Start" in function HLine.  Here's the code I'm having trouble with
  16.  
  17. void HLine(int x1, int x2, int y, inc col) 
  18. {
  19.   asm {
  20.         mov ax, VGA_Screen /* VGA_Screen is the screen offset in mode 13h or 0xA000h */
  21.         mov es, ax
  22.         mov ax, y
  23.         mov di, ax
  24.         shl ax, 8
  25.         shl di, 6
  26.         add di, ax
  27.         add di, x1
  28.         mov al, col
  29.         mov ah, al
  30.         mov cx, x2
  31.         sub cx, x1
  32.         shr cx, 1
  33.         jnc _Start
  34.         stosb
  35.         
  36.         _Start:
  37.         rep stosw
  38.   }
  39. };
  40.  
  41. If someone could tell me what I'm doing wrong I would be most grateful.
  42.